package com.example.demo05.service.impl;

import com.example.demo05.pojo.User;
import com.example.demo05.mapper.UserMapper;
import com.example.demo05.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author anxuan
 * @since 2021-06-17
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Autowired
    UserMapper userMapper;

    @Override
    public User getByLoginId(String loginId) {
        return userMapper.selectByLoginId(loginId);
    }

    @Override
    public User getByUserName(String userName) {
        return userMapper.selectByUserName(userName);
    }

    @Override
    public List<User> getLikeLoginId(String loginId) {
        return userMapper.getLikeLoginId(loginId);
    }

    @Override
    public List<User> getAdminLikeLoginId(String loginId) {
        return userMapper.getAdminLikeLoginId(loginId);
    }

    @Override
    public List<User> getByIdentity(String identity) {
        return userMapper.getByIdentity(identity);
    }

    @Override
    public void delete(String loginId) {
        userMapper.delete(loginId);
    }

    @Override
    public List<User> getNoClock(){
        return userMapper.getNoClock();
    }


}
